<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>修改用户信息</title>
    <!-- 指定字符集 -->
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>修改用户</title>

    <link href="css/bootstrap.min.css" rel="stylesheet">
    <script src="js/jquery-2.1.0.min.js"></script>
    <script src="js/bootstrap.min.js"></script>

</head>
<body>
    <div class="container" style="width: 400px;">
        <h3 style="text-align: center">修改用户信息</h3>
        <form action="${pageContext.request.contextPath}/updateUserServlet" method="post">
            <!-- 隐藏于提交id -->
            <input type="hidden" name="id" value="${user.id}">
            <div class="form-group">
                <label for="name">姓名</label>
                <input type="text" class="form-control" name="name" id="name" value="${user.name}" readonly="readonly" >
            </div>
            <div class="form-group">
                <label>性别</label>
                <c:if test="${user.gender == '男'}">
                    <input type="radio" name="gender" value="${user.gender}" checked>男
                    <input type="radio" name="gender" value="${user.gender}">女
                </c:if>
                <c:if test="${user.gender != '男'}">
                    <input type="radio" name="gender" value="${user.gender}">男
                    <input type="radio" name="gender" value="${user.gender}"  checked>女
                </c:if>
            </div>
            <div class="form-group">
                <label for="age">年龄</label>
                <input type="text" class="form-control" name="age" id="age" value="${user.age}">
            </div>
            <div class="form-group">
                <label for="address">籍贯</label>
                <select name="address" id="address" class="form-control">
                    <c:if test="${user.address == '河南濮阳'}">
                        <option value="河南濮阳" selected>河南濮阳</option>
                        <option value="河南安阳">河南安阳</option>
                        <option value="河南信阳">河南信阳</option>
                    </c:if>
                    <c:if test="${user.address == '河南安阳'}">
                        <option value="河南濮阳">河南濮阳</option>
                        <option value="河南安阳" selected>河南安阳</option>
                        <option value="河南信阳">河南信阳</option>
                    </c:if>
                    <c:if test="${user.address == '河南信阳'}">
                        <option value="河南濮阳">河南濮阳</option>
                        <option value="河南安阳">河南安阳</option>
                        <option value="河南信阳" selected>河南信阳</option>
                    </c:if>
                </select>
            </div>
            <div class="form-group">
                <label for="qq">qq</label>
                <input type="text" class="form-control" name="qq" id="qq" value="${user.qq}">
            </div>
            <div class="form-group">
                <label for="email">邮箱</label>
                <input type="text" class="form-control" name="email" id="email" value="${user.email}">
            </div>

            <div class="form-group" style="text-align: center">
                <input class="btn btn-primary" type="submit" value="提交" />
                <input class="btn btn-default" type="reset" value="重置" />
                <input class="btn btn-default" type="button" value="返回"/>
            </div>
        </form>
    </div>
</body>
</html>
